﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using AjaxChatService.Models;
using AjaxChatService.YahooMessenger;

namespace AjaxChatService.Controllers
{
    public class RSSYahooController : ApiController
    {
        private RSSYahooUtils _helper = new RSSYahooUtils();
        // GET api/rssyahoo
        public IEnumerable<string> Get()
        {
            return new string[] { "value1", "value2" };
        }

        // GET api/rssyahoo/5
        public List<RSSYahooItem> GetRssYahoo(string category)
        {
            List<RSSYahooItem> rssItems = _helper.GetRssByTag(category);

            return rssItems;
        }

        // POST api/rssyahoo
        public void Post([FromBody]string value)
        {
        }

        // PUT api/rssyahoo/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/rssyahoo/5
        public void Delete(int id)
        {
        }
    }
}
